<template>

  <div style="width:100%; padding:2px 0px 0px 10px">
    <table>
      <tr>
        <td colspan="2">
          <span style="font-size:6px;"> {{getBasMaterial("Department",apply.patient.dependency)}}
            {{apply.patient.hospitalNumber}}</span>
        </td>
      </tr>
      <tr>
        <td style="font-size:6px;">{{apply.patient.name}} {{getEnum("BasSex",apply.patient.sex)}}
          {{apply.patient.age}}
          {{apply.patient.berth}}床</td>
      </tr>
      <tr>
        <td style="font-size:6px;">交叉配血 输血科 全血 紫管</td>
      </tr>
      <tr>
        <td style=""> <svg id="barcode2" v-if="isCustomCode" /> </td>
      </tr>
    </table>
    <div v-if="isCustomCode">{{GetBarcode("#barcode2",item.code,"CODE128",22,1.2,1,12,0)}}</div>
  </div>

</template>

<script>
export default {
  name: "NursingPrint",
  methods: {
    //getBasMaterial(UserId)  //根据用户ID获取用户名
    getUserName() {
      return "username"
    },

    //getEnum("BasSex",id) //获取枚举名称
    getEnum() {},

    //getBasMaterial("Department",id) //获取部门
    //getBasMaterial("BloodVariety",id) //获取血液品种名称
    //getBasMaterial("BloodVariety",id) //获取血液产品名称
    getBasMaterial() {
      return "xxx"
    },
  },
  data: function () {
    return {
      item: {
        id: 26,
        code: "APL200708012",
        traApplyBillNo: "APL200708012",
        basDepartmentId: "031301",
        abo: "A",
        rhD: "RH+",
        name: "付云峰",
        sex: 1,
        gatheringUserId: null,
        gatheringDate: null,
        gatheringAuditUserId: null,
        inspectUserId: null,
        inspectDate: null,
        receiverUserId: 2,
        receiveDate: "2020-07-08 17:38:29",
        billStatus: 0,
        inspectOutDate: null,
        inspectOutUserId: null,
      },
      apply: {
        master: {
          isOutpatient: null,
          middleAuditUserId: 1073,
          middleAuditTime: "2020-07-08 17:34:50",
          middleAuditInfo: null,
          billNo: "APL200708012",
          manualNo: null,
          billType: null,
          billStatus: 3,
          auditUserId: 2,
          auditInfo: "",
          auditTime: "2020-07-08 17:36:20",
          applyType: 5,
          isExigence: false,
          perTranTime: "2020-07-08 17:35:11",
          auditLevel: 2,
          traType: 3,
          traPerAppraiseBillNo: "",
          isDeleted: false,
          deleterUserId: null,
          deletionTime: null,
          lastModificationTime: "2020-07-08 17:36:39",
          lastModifierUserId: 2,
          creationTime: "2020-07-08 17:34:37",
          creatorUserId: 929,
          id: "APL200708012",
        },
        patient: {
          billNo: "APL200708012",
          patientId: "71756637",
          hospitalNumber: "71756637",
          name: "付云峰",
          sex: 1,
          age: "23",
          birthday: "1997-03-03",
          dependency: "160101",
          apanage: 0,
          abo: "A",
          rhD: "RH+",
          transfuseHistory: 0,
          reactionHistory: 0,
          gestationHistory: 0,
          parturitionHistory: 0,
          transplantMatchHistory: 0,
          basDepartmentId: "031301",
          basSingleDiseaseId: null,
          patientType1: 0,
          patientType2: 0,
          isWrittenConsent: true,
          berth: "53",
          clinicDiagnose: "病毒性感染",
          traAim: "血浆置换",
          result: null,
          visitId: "",
          traZyzt: 0,
          personII: "",
          admitDate: "NaN-NaN-NaN",
          visitCount: 1,
          clinicDiagnoseCode: "B34.900",
          cardCode: null,
          irregularAntibody: true,
          info1: null,
          info2: null,
          info3: null,
          info4: null,
          info5: null,
        },
        basPatient: {
          id: "71756637",
          hospitalNumber: "71756637",
          name: "付云峰",
          sex: 1,
          age: "23",
          birthday: "1997-03-03",
          apanage: 0,
          abo: "A",
          rhD: "RH+",
          transfuseHistory: 0,
          reactionHistory: 0,
          gestationHistory: 0,
          parturitionHistory: 0,
          transplantMatchHistory: 0,
          matchHistory: 0,
          lastTypeReviewBillNo: "REV200708006",
          lastTypeReviewTime: "2020-07-08 17:36:39",
          typeReviewBillDetail: {
            billNo: "REV200708006",
            aboPositive: "A",
            aboNegative: "A",
            aboResult: "A",
            aboBloodTyping: 25,
            rhBloodTyping: 26,
            subtype: null,
            rhDResult: "RH+",
            antibodyScreen1: null,
            antibodyScreen2: null,
            antibodyScreen3: null,
            antibodyScreenResult: 0,
            antiHumanGlobulin: 0,
            irregularAntibody: null,
            plAntiScreen: null,
            plInspectDate: null,
          },
          personII: "",
        },
        specimenInfo: {
          code: "APL200708012",
          traApplyBillNo: "APL200708012",
          basDepartmentId: "031301",
          abo: "A",
          rhD: "RH+",
          name: "付云峰",
          sex: 1,
          gatheringUserId: null,
          gatheringAuditUserId: null,
          gatheringDate: null,
          inspectUserId: null,
          inspectDate: null,
          receiverUserId: 2,
          receiveDate: "2020-07-08 17:38:29",
          inspectOutUserId: null,
          inspectOutDate: null,
          billStatus: 0,
          isDeleted: false,
          deleterUserId: null,
          deletionTime: null,
          lastModificationTime: "2020-07-08 17:35:51",
          lastModifierUserId: 2,
          creationTime: "2020-07-08 17:34:37",
          creatorUserId: 929,
          id: 26,
        },
        detail: {
          billNo: "APL200708012",
          basBloodVarietyId: 1,
          applyBloodType: "A",
          applyRhD: "RH+",
          applySum: 1,
          specialProcessing: null,
          replaceBloodVarietyId: null,
          remark: null,
          beforeSurgery: null,
          otherIllustrates: null,
          isTypeReview: false,
          basSxhlx: 0,
          varietyNorm: null,
          traSpecimenInfoId: 26,
          hasSum: 1,
          bloodOutSum: null,
          basBloodVariety: {
            lastModifierUserId: null,
            lastModificationTime: null,
            code: "1",
            name: "悬浮红细胞",
            isEnabled: true,
            unit: "u",
            isCrossMatch: true,
            basXyzl: 1,
            isQuantity: true,
            unitRate: 200,
            expirationTime: 3,
            id: 1,
          },
        },
        billSpecimen: null,
        inspectBeforeTrans: [
          {
            billNo: "APL200708012",
            inspectBeforeTranId: 1,
            value: "未查",
            inspectBeforeTran: null,
            creationTime: "2020-07-08 17:34:37",
            creatorUserId: null,
            id: 965,
          },
          {
            billNo: "APL200708012",
            inspectBeforeTranId: 2,
            value: "未查",
            inspectBeforeTran: null,
            creationTime: "2020-07-08 17:34:37",
            creatorUserId: null,
            id: 966,
          },
          {
            billNo: "APL200708012",
            inspectBeforeTranId: 3,
            value: "未查",
            inspectBeforeTran: null,
            creationTime: "2020-07-08 17:34:37",
            creatorUserId: null,
            id: 967,
          },
          {
            billNo: "APL200708012",
            inspectBeforeTranId: 4,
            value: "未查",
            inspectBeforeTran: null,
            creationTime: "2020-07-08 17:34:37",
            creatorUserId: null,
            id: 968,
          },
          {
            billNo: "APL200708012",
            inspectBeforeTranId: 5,
            value: "未查",
            inspectBeforeTran: null,
            creationTime: "2020-07-08 17:34:37",
            creatorUserId: null,
            id: 969,
          },
          {
            billNo: "APL200708012",
            inspectBeforeTranId: 6,
            value: "未查",
            inspectBeforeTran: null,
            creationTime: "2020-07-08 17:34:37",
            creatorUserId: null,
            id: 970,
          },
          {
            billNo: "APL200708012",
            inspectBeforeTranId: 7,
            value: "未查",
            inspectBeforeTran: null,
            creationTime: "2020-07-08 17:34:37",
            creatorUserId: null,
            id: 971,
          },
          {
            billNo: "APL200708012",
            inspectBeforeTranId: 8,
            value: "3",
            inspectBeforeTran: null,
            creationTime: "2020-07-08 17:34:37",
            creatorUserId: null,
            id: 972,
          },
          {
            billNo: "APL200708012",
            inspectBeforeTranId: 11,
            value: "3",
            inspectBeforeTran: null,
            creationTime: "2020-07-08 17:34:37",
            creatorUserId: null,
            id: 973,
          },
          {
            billNo: "APL200708012",
            inspectBeforeTranId: 12,
            value: "3",
            inspectBeforeTran: null,
            creationTime: "2020-07-08 17:34:37",
            creatorUserId: null,
            id: 974,
          },
          {
            billNo: "APL200708012",
            inspectBeforeTranId: 13,
            value: "未查",
            inspectBeforeTran: null,
            creationTime: "2020-07-08 17:34:37",
            creatorUserId: null,
            id: 975,
          },
          {
            billNo: "APL200708012",
            inspectBeforeTranId: 15,
            value: "阴性",
            inspectBeforeTran: null,
            creationTime: "2020-07-08 17:34:37",
            creatorUserId: null,
            id: 976,
          },
        ],
        criterions: [],
      },
    }
  },
}
</script>
